import request from '@/utils/request'

// 查询分销管理列表
export function listDistribution(query) {
  return request({
    url: '/system/distribution/list',
    method: 'get',
    params: query
  })
}

// 查询分销管理详细
export function getDistribution(distid) {
  return request({
    url: '/system/distribution/' + distid,
    method: 'get'
  })
}

// 新增分销管理
export function addDistribution(data) {
  return request({
    url: '/system/distribution',
    method: 'post',
    data: data
  })
}

// 修改分销管理
export function updateDistribution(data) {
  return request({
    url: '/system/distribution',
    method: 'put',
    data: data
  })
}

// 删除分销管理
export function delDistribution(distid) {
  return request({
    url: '/system/distribution/' + distid,
    method: 'delete'
  })
}

// 导出分销管理
export function exportDistribution(query) {
  return request({
    url: '/system/distribution/export',
    method: 'get',
    params: query
  })
}   

//获取验证码
export function getCodes() {
  return request({
    url: '/system/distribution/getCode',
    method: 'get'
  })
}
//校验上级信息是否正确
export function checkUserAskCode(query){
      return request({
        url: '/system/distribution/checkUser',
        method: 'post',
        params: query
      })

}